package histogram;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.Partitioner;

public class HistogramPartitioner implements Partitioner<MyTripleKey, IntWritable> {
	
	public HistogramPartitioner() {
	}
	
	@Override
	public void configure(JobConf conf) {
	}
	
	@Override
	public int getPartition(MyTripleKey key, IntWritable value, int numPartitions) {
		return (key.getDatasetId()) % numPartitions;
	}
}
